package com.pca.headline.service;

import com.pca.headline.pojo.NewsHeadline;
import com.pca.headline.pojo.vo.HeadlineDetailVo;
import com.pca.headline.pojo.vo.HeadlineQueryVo;

import java.util.Map;

public interface NewsHeadlineService {

    /**
     * pageInfo{
     *     pageData[
     *         {
     *               Integer hid;
     *               String title;
     *               Integer type;
     *               Integer pageViews;
     *               Long pastHours;
     *               Integer publisher;
     *         },
     *  pageNum //页码数
     *  pageSize //页大小
     *  totalPage //总页数
     *  totalSize //总记录数
     *     ]
     * }
     * @param headlineQuery
     * @return
     */
    Map findPage(HeadlineQueryVo headlineQuery);

    HeadlineDetailVo findHeadlineDetail(int id);

    int addNewsHeadline(NewsHeadline newsHeadline);

    NewsHeadline findByHid(int hid);

    int updateNewsHeadline(NewsHeadline headline);

    int removeByHid(int hid);
}
